'''
Condition functions

Condition funtions are used to filter out the valid individuals.
'''

from individual import Individual

def dev_cond(ind):
    assert isinstance(ind, Individual)
    return ind.is_alive() and ind.genotype != None and ind.phenotype == None

def eval_area_cond(ind):
    assert isinstance(ind, Individual)
    return ind.is_alive() and ind.phenotype != None and ind.score_area == None

def eval_vol_cond(ind):
    assert isinstance(ind, Individual)
    return ind.is_alive() and ind.phenotype != None and ind.score_vol == None

def feedback_cond(ind):
    assert isinstance(ind, Individual)
    return ind.is_alive() and ind.score_area != None and ind.score_vol != None
